(()=>{
    class Person{
        //定义属性
        name:string
        age:number
        sex:string
        constructor(name:string,age:number,sex:string){
            this.name = name;
            this.age = age;
            this.sex = sex;
        }
        sayHi(str:string){
            console.log(`大家好,我是${this.name},今年${this.age},性别是${this.sex}+ ${str}`);
        }
    }
    const person = new Person("不是人",18,"男");
    person.sayHi("1212");
})()